package git.bankview.wl.style;

import java.util.*;

import laya.semi.process.*;

import org.apache.log4j.Logger;

public class ListDecoratorActivity
	implements IGenericClassActivity
{
	private static Logger log = Logger.getLogger(ListDecoratorActivity.class);
   
	public void execute(IProcessContext oCtx)
		throws Exception
	{
		String[] vParam = oCtx.getActivityParameter().split(":");
		String oDestList = vParam[0];
		String oStyleField = vParam[1];
		List oStyleList = (List)oCtx.getField(oDestList);
		for (int i = 0; i < oStyleList.size(); ++i)
		{
			((Map)oStyleList.get(i)).put(oStyleField, String.valueOf(i % 2));
		}
	}
}
